package com.ssm.service;

import com.github.pagehelper.PageInfo;
import com.ssm.base.BaseService;
import com.ssm.entity.UserFollow;
import com.ssm.vo.UserFollowVo;
import org.apache.ibatis.annotations.Param;

/**
 * @Author jie_ge
 * @Date 2022/4/21
 */
public interface UserFollowService extends BaseService<UserFollow> {
    /**
     * 关注房源
     * @param userId
     * @param houseId
     */
    void follow(Long userId,Long houseId);

    /**
     * 是否关注房源
     * @param userId
     * @param houseId
     * @return
     */
    Boolean isFollow(Long userId,Long houseId);

    /**
     * 我的关注
     * @param pageNum
     * @param pageSize
     * @param userId
     * @return
     */
    PageInfo<UserFollowVo> findListPage(int pageNum, int pageSize, Long userId);

    /**
     * 取消关注
     * @param id
     */
    void cancelFollow(Long id);
}
